import React from 'react';
import {NavLink} from 'umi'
import './index.less'

export default function IndexLayout(props:any) {

  // 控制选项卡显示和隐藏
  if (props.location.pathname === '/city' || props.location.pathname.includes('/detail')){
    return <div>{props.children}</div>
  }

  return (
    <div>
      {props.children}

      <ul>
        <li>
          <NavLink to='/film' activeClassName='active'>电影</NavLink>
        </li>
        <li>
          <NavLink to='/cinemas' activeClassName='active'>影院</NavLink>
        </li>
        <li>
          <NavLink to='/center' activeClassName='active'>我的</NavLink>
        </li>
      </ul>
    </div>
  )
}
